using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;
namespace CXDB{
    /// <summary>
    /// Strongly-typed collection for the VwApplyExportSafty class.
    /// </summary>
    [Serializable]
    public partial class VwApplyExportSaftyCollection : ReadOnlyList<VwApplyExportSafty, VwApplyExportSaftyCollection>
    {        
        public VwApplyExportSaftyCollection() {}
    }
    /// <summary>
    /// This is  Read-only wrapper class for the vw_apply_export_safty view.
    /// </summary>
    [Serializable]
    public partial class VwApplyExportSafty : ReadOnlyRecord<VwApplyExportSafty>, IReadOnlyRecord
    {
    
	    #region Default Settings
	    protected static void SetSQLProps() 
	    {
		    GetTableSchema();
	    }
	    #endregion
        #region Schema Accessor
	    public static TableSchema.Table Schema
        {
            get
            {
                if (BaseSchema == null)
                {
                    SetSQLProps();
                }
                return BaseSchema;
            }
        }
    	
        private static void GetTableSchema() 
        {
            if(!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("vw_apply_export_safty", TableType.View, DataService.GetInstance("CXDB"));
                schema.Columns = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns
                
                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName = "ID";
                colvarId.DataType = DbType.Int32;
                colvarId.MaxLength = 0;
                colvarId.AutoIncrement = false;
                colvarId.IsNullable = false;
                colvarId.IsPrimaryKey = false;
                colvarId.IsForeignKey = false;
                colvarId.IsReadOnly = false;
                
                schema.Columns.Add(colvarId);
                
                TableSchema.TableColumn colvarUserID = new TableSchema.TableColumn(schema);
                colvarUserID.ColumnName = "userID";
                colvarUserID.DataType = DbType.Int32;
                colvarUserID.MaxLength = 0;
                colvarUserID.AutoIncrement = false;
                colvarUserID.IsNullable = true;
                colvarUserID.IsPrimaryKey = false;
                colvarUserID.IsForeignKey = false;
                colvarUserID.IsReadOnly = false;
                
                schema.Columns.Add(colvarUserID);
                
                TableSchema.TableColumn colvarDeptID = new TableSchema.TableColumn(schema);
                colvarDeptID.ColumnName = "DeptID";
                colvarDeptID.DataType = DbType.Int32;
                colvarDeptID.MaxLength = 0;
                colvarDeptID.AutoIncrement = false;
                colvarDeptID.IsNullable = true;
                colvarDeptID.IsPrimaryKey = false;
                colvarDeptID.IsForeignKey = false;
                colvarDeptID.IsReadOnly = false;
                
                schema.Columns.Add(colvarDeptID);
                
                TableSchema.TableColumn colvarAccidentTime = new TableSchema.TableColumn(schema);
                colvarAccidentTime.ColumnName = "Accident_time";
                colvarAccidentTime.DataType = DbType.DateTime;
                colvarAccidentTime.MaxLength = 0;
                colvarAccidentTime.AutoIncrement = false;
                colvarAccidentTime.IsNullable = true;
                colvarAccidentTime.IsPrimaryKey = false;
                colvarAccidentTime.IsForeignKey = false;
                colvarAccidentTime.IsReadOnly = false;
                
                schema.Columns.Add(colvarAccidentTime);
                
                TableSchema.TableColumn colvarAccidentDuty = new TableSchema.TableColumn(schema);
                colvarAccidentDuty.ColumnName = "Accident_Duty";
                colvarAccidentDuty.DataType = DbType.String;
                colvarAccidentDuty.MaxLength = 100;
                colvarAccidentDuty.AutoIncrement = false;
                colvarAccidentDuty.IsNullable = true;
                colvarAccidentDuty.IsPrimaryKey = false;
                colvarAccidentDuty.IsForeignKey = false;
                colvarAccidentDuty.IsReadOnly = false;
                
                schema.Columns.Add(colvarAccidentDuty);
                
                TableSchema.TableColumn colvarAccidentReason = new TableSchema.TableColumn(schema);
                colvarAccidentReason.ColumnName = "Accident_reason";
                colvarAccidentReason.DataType = DbType.String;
                colvarAccidentReason.MaxLength = 1073741823;
                colvarAccidentReason.AutoIncrement = false;
                colvarAccidentReason.IsNullable = true;
                colvarAccidentReason.IsPrimaryKey = false;
                colvarAccidentReason.IsForeignKey = false;
                colvarAccidentReason.IsReadOnly = false;
                
                schema.Columns.Add(colvarAccidentReason);
                
                TableSchema.TableColumn colvarSaftyMasterID = new TableSchema.TableColumn(schema);
                colvarSaftyMasterID.ColumnName = "Safty_MasterID";
                colvarSaftyMasterID.DataType = DbType.Int32;
                colvarSaftyMasterID.MaxLength = 0;
                colvarSaftyMasterID.AutoIncrement = false;
                colvarSaftyMasterID.IsNullable = true;
                colvarSaftyMasterID.IsPrimaryKey = false;
                colvarSaftyMasterID.IsForeignKey = false;
                colvarSaftyMasterID.IsReadOnly = false;
                
                schema.Columns.Add(colvarSaftyMasterID);
                
                TableSchema.TableColumn colvarSaftyMasterTime = new TableSchema.TableColumn(schema);
                colvarSaftyMasterTime.ColumnName = "Safty_Master_time";
                colvarSaftyMasterTime.DataType = DbType.DateTime;
                colvarSaftyMasterTime.MaxLength = 0;
                colvarSaftyMasterTime.AutoIncrement = false;
                colvarSaftyMasterTime.IsNullable = true;
                colvarSaftyMasterTime.IsPrimaryKey = false;
                colvarSaftyMasterTime.IsForeignKey = false;
                colvarSaftyMasterTime.IsReadOnly = false;
                
                schema.Columns.Add(colvarSaftyMasterTime);
                
                TableSchema.TableColumn colvarSaftyMasterStatus = new TableSchema.TableColumn(schema);
                colvarSaftyMasterStatus.ColumnName = "Safty_Master_Status";
                colvarSaftyMasterStatus.DataType = DbType.Int32;
                colvarSaftyMasterStatus.MaxLength = 0;
                colvarSaftyMasterStatus.AutoIncrement = false;
                colvarSaftyMasterStatus.IsNullable = true;
                colvarSaftyMasterStatus.IsPrimaryKey = false;
                colvarSaftyMasterStatus.IsForeignKey = false;
                colvarSaftyMasterStatus.IsReadOnly = false;
                
                schema.Columns.Add(colvarSaftyMasterStatus);
                
                TableSchema.TableColumn colvarSaftyMasterRemark = new TableSchema.TableColumn(schema);
                colvarSaftyMasterRemark.ColumnName = "Safty_Master_Remark";
                colvarSaftyMasterRemark.DataType = DbType.String;
                colvarSaftyMasterRemark.MaxLength = 1073741823;
                colvarSaftyMasterRemark.AutoIncrement = false;
                colvarSaftyMasterRemark.IsNullable = true;
                colvarSaftyMasterRemark.IsPrimaryKey = false;
                colvarSaftyMasterRemark.IsForeignKey = false;
                colvarSaftyMasterRemark.IsReadOnly = false;
                
                schema.Columns.Add(colvarSaftyMasterRemark);
                
                TableSchema.TableColumn colvarDeptMasterId = new TableSchema.TableColumn(schema);
                colvarDeptMasterId.ColumnName = "Dept_Master_ID";
                colvarDeptMasterId.DataType = DbType.Int32;
                colvarDeptMasterId.MaxLength = 0;
                colvarDeptMasterId.AutoIncrement = false;
                colvarDeptMasterId.IsNullable = true;
                colvarDeptMasterId.IsPrimaryKey = false;
                colvarDeptMasterId.IsForeignKey = false;
                colvarDeptMasterId.IsReadOnly = false;
                
                schema.Columns.Add(colvarDeptMasterId);
                
                TableSchema.TableColumn colvarDeptMasterRemark = new TableSchema.TableColumn(schema);
                colvarDeptMasterRemark.ColumnName = "Dept_Master_Remark";
                colvarDeptMasterRemark.DataType = DbType.String;
                colvarDeptMasterRemark.MaxLength = 1073741823;
                colvarDeptMasterRemark.AutoIncrement = false;
                colvarDeptMasterRemark.IsNullable = true;
                colvarDeptMasterRemark.IsPrimaryKey = false;
                colvarDeptMasterRemark.IsForeignKey = false;
                colvarDeptMasterRemark.IsReadOnly = false;
                
                schema.Columns.Add(colvarDeptMasterRemark);
                
                TableSchema.TableColumn colvarDeptMasterStatus = new TableSchema.TableColumn(schema);
                colvarDeptMasterStatus.ColumnName = "Dept_Master_Status";
                colvarDeptMasterStatus.DataType = DbType.Int32;
                colvarDeptMasterStatus.MaxLength = 0;
                colvarDeptMasterStatus.AutoIncrement = false;
                colvarDeptMasterStatus.IsNullable = true;
                colvarDeptMasterStatus.IsPrimaryKey = false;
                colvarDeptMasterStatus.IsForeignKey = false;
                colvarDeptMasterStatus.IsReadOnly = false;
                
                schema.Columns.Add(colvarDeptMasterStatus);
                
                TableSchema.TableColumn colvarDeptMasterTime = new TableSchema.TableColumn(schema);
                colvarDeptMasterTime.ColumnName = "Dept_Master_time";
                colvarDeptMasterTime.DataType = DbType.DateTime;
                colvarDeptMasterTime.MaxLength = 0;
                colvarDeptMasterTime.AutoIncrement = false;
                colvarDeptMasterTime.IsNullable = true;
                colvarDeptMasterTime.IsPrimaryKey = false;
                colvarDeptMasterTime.IsForeignKey = false;
                colvarDeptMasterTime.IsReadOnly = false;
                
                schema.Columns.Add(colvarDeptMasterTime);
                
                TableSchema.TableColumn colvarBossUserID = new TableSchema.TableColumn(schema);
                colvarBossUserID.ColumnName = "Boss_UserID";
                colvarBossUserID.DataType = DbType.Int32;
                colvarBossUserID.MaxLength = 0;
                colvarBossUserID.AutoIncrement = false;
                colvarBossUserID.IsNullable = true;
                colvarBossUserID.IsPrimaryKey = false;
                colvarBossUserID.IsForeignKey = false;
                colvarBossUserID.IsReadOnly = false;
                
                schema.Columns.Add(colvarBossUserID);
                
                TableSchema.TableColumn colvarBossTime = new TableSchema.TableColumn(schema);
                colvarBossTime.ColumnName = "Boss_time";
                colvarBossTime.DataType = DbType.DateTime;
                colvarBossTime.MaxLength = 0;
                colvarBossTime.AutoIncrement = false;
                colvarBossTime.IsNullable = true;
                colvarBossTime.IsPrimaryKey = false;
                colvarBossTime.IsForeignKey = false;
                colvarBossTime.IsReadOnly = false;
                
                schema.Columns.Add(colvarBossTime);
                
                TableSchema.TableColumn colvarBossRemark = new TableSchema.TableColumn(schema);
                colvarBossRemark.ColumnName = "Boss_Remark";
                colvarBossRemark.DataType = DbType.String;
                colvarBossRemark.MaxLength = 1073741823;
                colvarBossRemark.AutoIncrement = false;
                colvarBossRemark.IsNullable = true;
                colvarBossRemark.IsPrimaryKey = false;
                colvarBossRemark.IsForeignKey = false;
                colvarBossRemark.IsReadOnly = false;
                
                schema.Columns.Add(colvarBossRemark);
                
                TableSchema.TableColumn colvarBossStatus = new TableSchema.TableColumn(schema);
                colvarBossStatus.ColumnName = "Boss_Status";
                colvarBossStatus.DataType = DbType.Int32;
                colvarBossStatus.MaxLength = 0;
                colvarBossStatus.AutoIncrement = false;
                colvarBossStatus.IsNullable = true;
                colvarBossStatus.IsPrimaryKey = false;
                colvarBossStatus.IsForeignKey = false;
                colvarBossStatus.IsReadOnly = false;
                
                schema.Columns.Add(colvarBossStatus);
                
                TableSchema.TableColumn colvarEnteringUserID = new TableSchema.TableColumn(schema);
                colvarEnteringUserID.ColumnName = "EnteringUserID";
                colvarEnteringUserID.DataType = DbType.Int32;
                colvarEnteringUserID.MaxLength = 0;
                colvarEnteringUserID.AutoIncrement = false;
                colvarEnteringUserID.IsNullable = true;
                colvarEnteringUserID.IsPrimaryKey = false;
                colvarEnteringUserID.IsForeignKey = false;
                colvarEnteringUserID.IsReadOnly = false;
                
                schema.Columns.Add(colvarEnteringUserID);
                
                TableSchema.TableColumn colvarInTime = new TableSchema.TableColumn(schema);
                colvarInTime.ColumnName = "inTime";
                colvarInTime.DataType = DbType.DateTime;
                colvarInTime.MaxLength = 0;
                colvarInTime.AutoIncrement = false;
                colvarInTime.IsNullable = true;
                colvarInTime.IsPrimaryKey = false;
                colvarInTime.IsForeignKey = false;
                colvarInTime.IsReadOnly = false;
                
                schema.Columns.Add(colvarInTime);
                
                TableSchema.TableColumn colvarStatus = new TableSchema.TableColumn(schema);
                colvarStatus.ColumnName = "Status";
                colvarStatus.DataType = DbType.Int32;
                colvarStatus.MaxLength = 0;
                colvarStatus.AutoIncrement = false;
                colvarStatus.IsNullable = true;
                colvarStatus.IsPrimaryKey = false;
                colvarStatus.IsForeignKey = false;
                colvarStatus.IsReadOnly = false;
                
                schema.Columns.Add(colvarStatus);
                
                TableSchema.TableColumn colvarEnUsername = new TableSchema.TableColumn(schema);
                colvarEnUsername.ColumnName = "EN_username";
                colvarEnUsername.DataType = DbType.String;
                colvarEnUsername.MaxLength = 50;
                colvarEnUsername.AutoIncrement = false;
                colvarEnUsername.IsNullable = true;
                colvarEnUsername.IsPrimaryKey = false;
                colvarEnUsername.IsForeignKey = false;
                colvarEnUsername.IsReadOnly = false;
                
                schema.Columns.Add(colvarEnUsername);
                
                TableSchema.TableColumn colvarEnDepartment = new TableSchema.TableColumn(schema);
                colvarEnDepartment.ColumnName = "EN_Department";
                colvarEnDepartment.DataType = DbType.String;
                colvarEnDepartment.MaxLength = 50;
                colvarEnDepartment.AutoIncrement = false;
                colvarEnDepartment.IsNullable = true;
                colvarEnDepartment.IsPrimaryKey = false;
                colvarEnDepartment.IsForeignKey = false;
                colvarEnDepartment.IsReadOnly = false;
                
                schema.Columns.Add(colvarEnDepartment);
                
                TableSchema.TableColumn colvarEdUsername = new TableSchema.TableColumn(schema);
                colvarEdUsername.ColumnName = "ED_username";
                colvarEdUsername.DataType = DbType.String;
                colvarEdUsername.MaxLength = 50;
                colvarEdUsername.AutoIncrement = false;
                colvarEdUsername.IsNullable = true;
                colvarEdUsername.IsPrimaryKey = false;
                colvarEdUsername.IsForeignKey = false;
                colvarEdUsername.IsReadOnly = false;
                
                schema.Columns.Add(colvarEdUsername);
                
                TableSchema.TableColumn colvarGuid = new TableSchema.TableColumn(schema);
                colvarGuid.ColumnName = "Guid";
                colvarGuid.DataType = DbType.Guid;
                colvarGuid.MaxLength = 0;
                colvarGuid.AutoIncrement = false;
                colvarGuid.IsNullable = true;
                colvarGuid.IsPrimaryKey = false;
                colvarGuid.IsForeignKey = false;
                colvarGuid.IsReadOnly = false;
                
                schema.Columns.Add(colvarGuid);
                
                TableSchema.TableColumn colvarSaftyMasterName = new TableSchema.TableColumn(schema);
                colvarSaftyMasterName.ColumnName = "safty_master_name";
                colvarSaftyMasterName.DataType = DbType.String;
                colvarSaftyMasterName.MaxLength = 50;
                colvarSaftyMasterName.AutoIncrement = false;
                colvarSaftyMasterName.IsNullable = true;
                colvarSaftyMasterName.IsPrimaryKey = false;
                colvarSaftyMasterName.IsForeignKey = false;
                colvarSaftyMasterName.IsReadOnly = false;
                
                schema.Columns.Add(colvarSaftyMasterName);
                
                TableSchema.TableColumn colvarDeptMasterName = new TableSchema.TableColumn(schema);
                colvarDeptMasterName.ColumnName = "dept_master_name";
                colvarDeptMasterName.DataType = DbType.String;
                colvarDeptMasterName.MaxLength = 50;
                colvarDeptMasterName.AutoIncrement = false;
                colvarDeptMasterName.IsNullable = true;
                colvarDeptMasterName.IsPrimaryKey = false;
                colvarDeptMasterName.IsForeignKey = false;
                colvarDeptMasterName.IsReadOnly = false;
                
                schema.Columns.Add(colvarDeptMasterName);
                
                TableSchema.TableColumn colvarBossName = new TableSchema.TableColumn(schema);
                colvarBossName.ColumnName = "boss_name";
                colvarBossName.DataType = DbType.String;
                colvarBossName.MaxLength = 50;
                colvarBossName.AutoIncrement = false;
                colvarBossName.IsNullable = true;
                colvarBossName.IsPrimaryKey = false;
                colvarBossName.IsForeignKey = false;
                colvarBossName.IsReadOnly = false;
                
                schema.Columns.Add(colvarBossName);
                
                
                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["CXDB"].AddSchema("vw_apply_export_safty",schema);
            }
        }
        #endregion
        
        #region Query Accessor
	    public static Query CreateQuery()
	    {
		    return new Query(Schema);
	    }
	    #endregion
	    
	    #region .ctors
	    public VwApplyExportSafty()
	    {
            SetSQLProps();
            SetDefaults();
            MarkNew();
        }
        public VwApplyExportSafty(bool useDatabaseDefaults)
	    {
		    SetSQLProps();
		    if(useDatabaseDefaults)
		    {
				ForceDefaults();
			}
			MarkNew();
	    }
	    
	    public VwApplyExportSafty(object keyID)
	    {
		    SetSQLProps();
		    LoadByKey(keyID);
	    }
    	 
	    public VwApplyExportSafty(string columnName, object columnValue)
        {
            SetSQLProps();
            LoadByParam(columnName,columnValue);
        }
        
	    #endregion
	    
	    #region Props
	    
          
        [XmlAttribute("Id")]
        [Bindable(true)]
        public int Id 
	    {
		    get
		    {
			    return GetColumnValue<int>("ID");
		    }
            set 
		    {
			    SetColumnValue("ID", value);
            }
        }
	      
        [XmlAttribute("UserID")]
        [Bindable(true)]
        public int? UserID 
	    {
		    get
		    {
			    return GetColumnValue<int?>("userID");
		    }
            set 
		    {
			    SetColumnValue("userID", value);
            }
        }
	      
        [XmlAttribute("DeptID")]
        [Bindable(true)]
        public int? DeptID 
	    {
		    get
		    {
			    return GetColumnValue<int?>("DeptID");
		    }
            set 
		    {
			    SetColumnValue("DeptID", value);
            }
        }
	      
        [XmlAttribute("AccidentTime")]
        [Bindable(true)]
        public DateTime? AccidentTime 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("Accident_time");
		    }
            set 
		    {
			    SetColumnValue("Accident_time", value);
            }
        }
	      
        [XmlAttribute("AccidentDuty")]
        [Bindable(true)]
        public string AccidentDuty 
	    {
		    get
		    {
			    return GetColumnValue<string>("Accident_Duty");
		    }
            set 
		    {
			    SetColumnValue("Accident_Duty", value);
            }
        }
	      
        [XmlAttribute("AccidentReason")]
        [Bindable(true)]
        public string AccidentReason 
	    {
		    get
		    {
			    return GetColumnValue<string>("Accident_reason");
		    }
            set 
		    {
			    SetColumnValue("Accident_reason", value);
            }
        }
	      
        [XmlAttribute("SaftyMasterID")]
        [Bindable(true)]
        public int? SaftyMasterID 
	    {
		    get
		    {
			    return GetColumnValue<int?>("Safty_MasterID");
		    }
            set 
		    {
			    SetColumnValue("Safty_MasterID", value);
            }
        }
	      
        [XmlAttribute("SaftyMasterTime")]
        [Bindable(true)]
        public DateTime? SaftyMasterTime 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("Safty_Master_time");
		    }
            set 
		    {
			    SetColumnValue("Safty_Master_time", value);
            }
        }
	      
        [XmlAttribute("SaftyMasterStatus")]
        [Bindable(true)]
        public int? SaftyMasterStatus 
	    {
		    get
		    {
			    return GetColumnValue<int?>("Safty_Master_Status");
		    }
            set 
		    {
			    SetColumnValue("Safty_Master_Status", value);
            }
        }
	      
        [XmlAttribute("SaftyMasterRemark")]
        [Bindable(true)]
        public string SaftyMasterRemark 
	    {
		    get
		    {
			    return GetColumnValue<string>("Safty_Master_Remark");
		    }
            set 
		    {
			    SetColumnValue("Safty_Master_Remark", value);
            }
        }
	      
        [XmlAttribute("DeptMasterId")]
        [Bindable(true)]
        public int? DeptMasterId 
	    {
		    get
		    {
			    return GetColumnValue<int?>("Dept_Master_ID");
		    }
            set 
		    {
			    SetColumnValue("Dept_Master_ID", value);
            }
        }
	      
        [XmlAttribute("DeptMasterRemark")]
        [Bindable(true)]
        public string DeptMasterRemark 
	    {
		    get
		    {
			    return GetColumnValue<string>("Dept_Master_Remark");
		    }
            set 
		    {
			    SetColumnValue("Dept_Master_Remark", value);
            }
        }
	      
        [XmlAttribute("DeptMasterStatus")]
        [Bindable(true)]
        public int? DeptMasterStatus 
	    {
		    get
		    {
			    return GetColumnValue<int?>("Dept_Master_Status");
		    }
            set 
		    {
			    SetColumnValue("Dept_Master_Status", value);
            }
        }
	      
        [XmlAttribute("DeptMasterTime")]
        [Bindable(true)]
        public DateTime? DeptMasterTime 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("Dept_Master_time");
		    }
            set 
		    {
			    SetColumnValue("Dept_Master_time", value);
            }
        }
	      
        [XmlAttribute("BossUserID")]
        [Bindable(true)]
        public int? BossUserID 
	    {
		    get
		    {
			    return GetColumnValue<int?>("Boss_UserID");
		    }
            set 
		    {
			    SetColumnValue("Boss_UserID", value);
            }
        }
	      
        [XmlAttribute("BossTime")]
        [Bindable(true)]
        public DateTime? BossTime 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("Boss_time");
		    }
            set 
		    {
			    SetColumnValue("Boss_time", value);
            }
        }
	      
        [XmlAttribute("BossRemark")]
        [Bindable(true)]
        public string BossRemark 
	    {
		    get
		    {
			    return GetColumnValue<string>("Boss_Remark");
		    }
            set 
		    {
			    SetColumnValue("Boss_Remark", value);
            }
        }
	      
        [XmlAttribute("BossStatus")]
        [Bindable(true)]
        public int? BossStatus 
	    {
		    get
		    {
			    return GetColumnValue<int?>("Boss_Status");
		    }
            set 
		    {
			    SetColumnValue("Boss_Status", value);
            }
        }
	      
        [XmlAttribute("EnteringUserID")]
        [Bindable(true)]
        public int? EnteringUserID 
	    {
		    get
		    {
			    return GetColumnValue<int?>("EnteringUserID");
		    }
            set 
		    {
			    SetColumnValue("EnteringUserID", value);
            }
        }
	      
        [XmlAttribute("InTime")]
        [Bindable(true)]
        public DateTime? InTime 
	    {
		    get
		    {
			    return GetColumnValue<DateTime?>("inTime");
		    }
            set 
		    {
			    SetColumnValue("inTime", value);
            }
        }
	      
        [XmlAttribute("Status")]
        [Bindable(true)]
        public int? Status 
	    {
		    get
		    {
			    return GetColumnValue<int?>("Status");
		    }
            set 
		    {
			    SetColumnValue("Status", value);
            }
        }
	      
        [XmlAttribute("EnUsername")]
        [Bindable(true)]
        public string EnUsername 
	    {
		    get
		    {
			    return GetColumnValue<string>("EN_username");
		    }
            set 
		    {
			    SetColumnValue("EN_username", value);
            }
        }
	      
        [XmlAttribute("EnDepartment")]
        [Bindable(true)]
        public string EnDepartment 
	    {
		    get
		    {
			    return GetColumnValue<string>("EN_Department");
		    }
            set 
		    {
			    SetColumnValue("EN_Department", value);
            }
        }
	      
        [XmlAttribute("EdUsername")]
        [Bindable(true)]
        public string EdUsername 
	    {
		    get
		    {
			    return GetColumnValue<string>("ED_username");
		    }
            set 
		    {
			    SetColumnValue("ED_username", value);
            }
        }
	      
        [XmlAttribute("Guid")]
        [Bindable(true)]
        public Guid? Guid 
	    {
		    get
		    {
			    return GetColumnValue<Guid?>("Guid");
		    }
            set 
		    {
			    SetColumnValue("Guid", value);
            }
        }
	      
        [XmlAttribute("SaftyMasterName")]
        [Bindable(true)]
        public string SaftyMasterName 
	    {
		    get
		    {
			    return GetColumnValue<string>("safty_master_name");
		    }
            set 
		    {
			    SetColumnValue("safty_master_name", value);
            }
        }
	      
        [XmlAttribute("DeptMasterName")]
        [Bindable(true)]
        public string DeptMasterName 
	    {
		    get
		    {
			    return GetColumnValue<string>("dept_master_name");
		    }
            set 
		    {
			    SetColumnValue("dept_master_name", value);
            }
        }
	      
        [XmlAttribute("BossName")]
        [Bindable(true)]
        public string BossName 
	    {
		    get
		    {
			    return GetColumnValue<string>("boss_name");
		    }
            set 
		    {
			    SetColumnValue("boss_name", value);
            }
        }
	    
	    #endregion
    
	    #region Columns Struct
	    public struct Columns
	    {
		    
		    
            public static string Id = @"ID";
            
            public static string UserID = @"userID";
            
            public static string DeptID = @"DeptID";
            
            public static string AccidentTime = @"Accident_time";
            
            public static string AccidentDuty = @"Accident_Duty";
            
            public static string AccidentReason = @"Accident_reason";
            
            public static string SaftyMasterID = @"Safty_MasterID";
            
            public static string SaftyMasterTime = @"Safty_Master_time";
            
            public static string SaftyMasterStatus = @"Safty_Master_Status";
            
            public static string SaftyMasterRemark = @"Safty_Master_Remark";
            
            public static string DeptMasterId = @"Dept_Master_ID";
            
            public static string DeptMasterRemark = @"Dept_Master_Remark";
            
            public static string DeptMasterStatus = @"Dept_Master_Status";
            
            public static string DeptMasterTime = @"Dept_Master_time";
            
            public static string BossUserID = @"Boss_UserID";
            
            public static string BossTime = @"Boss_time";
            
            public static string BossRemark = @"Boss_Remark";
            
            public static string BossStatus = @"Boss_Status";
            
            public static string EnteringUserID = @"EnteringUserID";
            
            public static string InTime = @"inTime";
            
            public static string Status = @"Status";
            
            public static string EnUsername = @"EN_username";
            
            public static string EnDepartment = @"EN_Department";
            
            public static string EdUsername = @"ED_username";
            
            public static string Guid = @"Guid";
            
            public static string SaftyMasterName = @"safty_master_name";
            
            public static string DeptMasterName = @"dept_master_name";
            
            public static string BossName = @"boss_name";
            
	    }
	    #endregion
	    
	    
	    #region IAbstractRecord Members
        public new CT GetColumnValue<CT>(string columnName) {
            return base.GetColumnValue<CT>(columnName);
        }
        public object GetColumnValue(string columnName) {
            return base.GetColumnValue<object>(columnName);
        }
        #endregion
	    
    }
}
